//
//  BaseNavigationController.m
//  JQFY
//
//  Created by apple on 2017/8/6.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYBaseNavigationController.h"

@interface JQFYBaseNavigationController ()
@end

@implementation JQFYBaseNavigationController
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNavigationBarStyle];
}

#pragma mark - 设置导航栏样式
-(void)setupNavigationBarStyle{
    
    UINavigationBar *navBar = self.navigationBar;
    navBar.barTintColor = RGBCOLOR(120, 25, 234);
    [navBar setTintColor:[UIColor whiteColor]];
    [navBar setTranslucent:NO];
    [navBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    [navBar setShadowImage:[[UIImage alloc] init]];
    navBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont fontWithName:@"Courier-BoldOblique" size:16]};
    navBar.barStyle = UIBarStyleBlack;
}

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}


@end
